package com.pmsystem.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class SecurityMisExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SecurityMisExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andSecurityMisIdIsNull() {
            addCriterion("security_mis_id is null");
            return (Criteria) this;
        }

        public Criteria andSecurityMisIdIsNotNull() {
            addCriterion("security_mis_id is not null");
            return (Criteria) this;
        }

        public Criteria andSecurityMisIdEqualTo(Integer value) {
            addCriterion("security_mis_id =", value, "securityMisId");
            return (Criteria) this;
        }

        public Criteria andSecurityMisIdNotEqualTo(Integer value) {
            addCriterion("security_mis_id <>", value, "securityMisId");
            return (Criteria) this;
        }

        public Criteria andSecurityMisIdGreaterThan(Integer value) {
            addCriterion("security_mis_id >", value, "securityMisId");
            return (Criteria) this;
        }

        public Criteria andSecurityMisIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("security_mis_id >=", value, "securityMisId");
            return (Criteria) this;
        }

        public Criteria andSecurityMisIdLessThan(Integer value) {
            addCriterion("security_mis_id <", value, "securityMisId");
            return (Criteria) this;
        }

        public Criteria andSecurityMisIdLessThanOrEqualTo(Integer value) {
            addCriterion("security_mis_id <=", value, "securityMisId");
            return (Criteria) this;
        }

        public Criteria andSecurityMisIdIn(List<Integer> values) {
            addCriterion("security_mis_id in", values, "securityMisId");
            return (Criteria) this;
        }

        public Criteria andSecurityMisIdNotIn(List<Integer> values) {
            addCriterion("security_mis_id not in", values, "securityMisId");
            return (Criteria) this;
        }

        public Criteria andSecurityMisIdBetween(Integer value1, Integer value2) {
            addCriterion("security_mis_id between", value1, value2, "securityMisId");
            return (Criteria) this;
        }

        public Criteria andSecurityMisIdNotBetween(Integer value1, Integer value2) {
            addCriterion("security_mis_id not between", value1, value2, "securityMisId");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdIsNull() {
            addCriterion("security_area_id is null");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdIsNotNull() {
            addCriterion("security_area_id is not null");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdEqualTo(Integer value) {
            addCriterion("security_area_id =", value, "securityAreaId");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdNotEqualTo(Integer value) {
            addCriterion("security_area_id <>", value, "securityAreaId");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdGreaterThan(Integer value) {
            addCriterion("security_area_id >", value, "securityAreaId");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("security_area_id >=", value, "securityAreaId");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdLessThan(Integer value) {
            addCriterion("security_area_id <", value, "securityAreaId");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdLessThanOrEqualTo(Integer value) {
            addCriterion("security_area_id <=", value, "securityAreaId");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdIn(List<Integer> values) {
            addCriterion("security_area_id in", values, "securityAreaId");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdNotIn(List<Integer> values) {
            addCriterion("security_area_id not in", values, "securityAreaId");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdBetween(Integer value1, Integer value2) {
            addCriterion("security_area_id between", value1, value2, "securityAreaId");
            return (Criteria) this;
        }

        public Criteria andSecurityAreaIdNotBetween(Integer value1, Integer value2) {
            addCriterion("security_area_id not between", value1, value2, "securityAreaId");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdIsNull() {
            addCriterion("security_man_id is null");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdIsNotNull() {
            addCriterion("security_man_id is not null");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdEqualTo(Integer value) {
            addCriterion("security_man_id =", value, "securityManId");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdNotEqualTo(Integer value) {
            addCriterion("security_man_id <>", value, "securityManId");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdGreaterThan(Integer value) {
            addCriterion("security_man_id >", value, "securityManId");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("security_man_id >=", value, "securityManId");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdLessThan(Integer value) {
            addCriterion("security_man_id <", value, "securityManId");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdLessThanOrEqualTo(Integer value) {
            addCriterion("security_man_id <=", value, "securityManId");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdIn(List<Integer> values) {
            addCriterion("security_man_id in", values, "securityManId");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdNotIn(List<Integer> values) {
            addCriterion("security_man_id not in", values, "securityManId");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdBetween(Integer value1, Integer value2) {
            addCriterion("security_man_id between", value1, value2, "securityManId");
            return (Criteria) this;
        }

        public Criteria andSecurityManIdNotBetween(Integer value1, Integer value2) {
            addCriterion("security_man_id not between", value1, value2, "securityManId");
            return (Criteria) this;
        }

        public Criteria andMisTimeIsNull() {
            addCriterion("mis_time is null");
            return (Criteria) this;
        }

        public Criteria andMisTimeIsNotNull() {
            addCriterion("mis_time is not null");
            return (Criteria) this;
        }

        public Criteria andMisTimeEqualTo(Date value) {
            addCriterionForJDBCDate("mis_time =", value, "misTime");
            return (Criteria) this;
        }

        public Criteria andMisTimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("mis_time <>", value, "misTime");
            return (Criteria) this;
        }

        public Criteria andMisTimeGreaterThan(Date value) {
            addCriterionForJDBCDate("mis_time >", value, "misTime");
            return (Criteria) this;
        }

        public Criteria andMisTimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("mis_time >=", value, "misTime");
            return (Criteria) this;
        }

        public Criteria andMisTimeLessThan(Date value) {
            addCriterionForJDBCDate("mis_time <", value, "misTime");
            return (Criteria) this;
        }

        public Criteria andMisTimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("mis_time <=", value, "misTime");
            return (Criteria) this;
        }

        public Criteria andMisTimeIn(List<Date> values) {
            addCriterionForJDBCDate("mis_time in", values, "misTime");
            return (Criteria) this;
        }

        public Criteria andMisTimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("mis_time not in", values, "misTime");
            return (Criteria) this;
        }

        public Criteria andMisTimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("mis_time between", value1, value2, "misTime");
            return (Criteria) this;
        }

        public Criteria andMisTimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("mis_time not between", value1, value2, "misTime");
            return (Criteria) this;
        }

        public Criteria andIsFinishIsNull() {
            addCriterion("is_finish is null");
            return (Criteria) this;
        }

        public Criteria andIsFinishIsNotNull() {
            addCriterion("is_finish is not null");
            return (Criteria) this;
        }

        public Criteria andIsFinishEqualTo(Byte value) {
            addCriterion("is_finish =", value, "isFinish");
            return (Criteria) this;
        }

        public Criteria andIsFinishNotEqualTo(Byte value) {
            addCriterion("is_finish <>", value, "isFinish");
            return (Criteria) this;
        }

        public Criteria andIsFinishGreaterThan(Byte value) {
            addCriterion("is_finish >", value, "isFinish");
            return (Criteria) this;
        }

        public Criteria andIsFinishGreaterThanOrEqualTo(Byte value) {
            addCriterion("is_finish >=", value, "isFinish");
            return (Criteria) this;
        }

        public Criteria andIsFinishLessThan(Byte value) {
            addCriterion("is_finish <", value, "isFinish");
            return (Criteria) this;
        }

        public Criteria andIsFinishLessThanOrEqualTo(Byte value) {
            addCriterion("is_finish <=", value, "isFinish");
            return (Criteria) this;
        }

        public Criteria andIsFinishIn(List<Byte> values) {
            addCriterion("is_finish in", values, "isFinish");
            return (Criteria) this;
        }

        public Criteria andIsFinishNotIn(List<Byte> values) {
            addCriterion("is_finish not in", values, "isFinish");
            return (Criteria) this;
        }

        public Criteria andIsFinishBetween(Byte value1, Byte value2) {
            addCriterion("is_finish between", value1, value2, "isFinish");
            return (Criteria) this;
        }

        public Criteria andIsFinishNotBetween(Byte value1, Byte value2) {
            addCriterion("is_finish not between", value1, value2, "isFinish");
            return (Criteria) this;
        }

        public Criteria andOtherIsNull() {
            addCriterion("other is null");
            return (Criteria) this;
        }

        public Criteria andOtherIsNotNull() {
            addCriterion("other is not null");
            return (Criteria) this;
        }

        public Criteria andOtherEqualTo(String value) {
            addCriterion("other =", value, "other");
            return (Criteria) this;
        }

        public Criteria andOtherNotEqualTo(String value) {
            addCriterion("other <>", value, "other");
            return (Criteria) this;
        }

        public Criteria andOtherGreaterThan(String value) {
            addCriterion("other >", value, "other");
            return (Criteria) this;
        }

        public Criteria andOtherGreaterThanOrEqualTo(String value) {
            addCriterion("other >=", value, "other");
            return (Criteria) this;
        }

        public Criteria andOtherLessThan(String value) {
            addCriterion("other <", value, "other");
            return (Criteria) this;
        }

        public Criteria andOtherLessThanOrEqualTo(String value) {
            addCriterion("other <=", value, "other");
            return (Criteria) this;
        }

        public Criteria andOtherLike(String value) {
            addCriterion("other like", value, "other");
            return (Criteria) this;
        }

        public Criteria andOtherNotLike(String value) {
            addCriterion("other not like", value, "other");
            return (Criteria) this;
        }

        public Criteria andOtherIn(List<String> values) {
            addCriterion("other in", values, "other");
            return (Criteria) this;
        }

        public Criteria andOtherNotIn(List<String> values) {
            addCriterion("other not in", values, "other");
            return (Criteria) this;
        }

        public Criteria andOtherBetween(String value1, String value2) {
            addCriterion("other between", value1, value2, "other");
            return (Criteria) this;
        }

        public Criteria andOtherNotBetween(String value1, String value2) {
            addCriterion("other not between", value1, value2, "other");
            return (Criteria) this;
        }

        public Criteria andEnableIsNull() {
            addCriterion("enable is null");
            return (Criteria) this;
        }

        public Criteria andEnableIsNotNull() {
            addCriterion("enable is not null");
            return (Criteria) this;
        }

        public Criteria andEnableEqualTo(Byte value) {
            addCriterion("enable =", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableNotEqualTo(Byte value) {
            addCriterion("enable <>", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableGreaterThan(Byte value) {
            addCriterion("enable >", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableGreaterThanOrEqualTo(Byte value) {
            addCriterion("enable >=", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableLessThan(Byte value) {
            addCriterion("enable <", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableLessThanOrEqualTo(Byte value) {
            addCriterion("enable <=", value, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableIn(List<Byte> values) {
            addCriterion("enable in", values, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableNotIn(List<Byte> values) {
            addCriterion("enable not in", values, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableBetween(Byte value1, Byte value2) {
            addCriterion("enable between", value1, value2, "enable");
            return (Criteria) this;
        }

        public Criteria andEnableNotBetween(Byte value1, Byte value2) {
            addCriterion("enable not between", value1, value2, "enable");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}